/**
 * 鍒嗛〉涓昏鍙傛暟鍜岃皟鐢ㄦ柟娉�
  var obj={
    obj_box:'.class/#id...',          //缈婚〉瀹瑰櫒(css閫夋嫨鍣ㄥ潎鍙�)
    total_item:'鑷劧鏁�,蹇呭～',           //鏉＄洰鎬绘暟
    per_num:'鑷劧鏁�,閫夊～,榛樿10',       //姣忛〉鏉＄洰鏁�
    current_page:'鑷劧鏁�,閫夊～,榛樿1',   //褰撳墠椤�
    change_content:function(per_num,current_page){
      //鍐呭鍔犺浇鏂规硶,鍙弬鑰冪ず渚�
    }
  };
  page_ctrl(obj);//璋冪敤鍒嗛〉鎻掍欢
*/
//绀轰緥:
var obj_1={//瀹氫箟鍒嗛〉鍙傛暟鍜屾柟娉�
    obj_box:'.page_1',//缈婚〉瀹瑰櫒
    total_item:20,//鏉＄洰鎬绘暟
    per_num:5,//姣忛〉鏉＄洰鏁�
    current_page:1,//褰撳墠椤�
    //姝ゅ,璇蜂负椤甸潰缈婚〉灞曠ず鍐呭瀹氫箟鏂规硶
    change_content:function(per_num,current_page){
      per_num = per_num ? per_num : 10;//姣忛〉鏄剧ず鏉℃暟,榛樿涓�10鏉�
      current_page = current_page ? current_page : 1;//褰撳墠椤�,榛樿涓�1
      /*姝ゅ鏍规嵁椤圭洰瀹為檯鑷缂栧啓椤甸潰鏄剧ず鍐呭鐨勬柟娉�,涓句緥璇存槑:*/
      var page_content = '<ul style="width: 300px;margin: 10px auto;">';//褰撳墠椤靛唴瀹�
      for (var i = 0; i < per_num; i++) {
        page_content += '<li>' + ((current_page - 1) * per_num + i + 1) + ',鍒嗛〉鍐呭鏂规硶1</li>';
      }
      page_content += '</ul>';
      $(this.obj_box).children('.page_content').html(page_content);
    }
  };
  var obj_2={//瀹氫箟鍒嗛〉鍙傛暟鍜屾柟娉�
    obj_box:'.page_2',//缈婚〉瀹瑰櫒
    total_item:10,//鏉＄洰鎬绘暟
    per_num:5,//姣忛〉鏉＄洰鏁�
    current_page:1,//褰撳墠椤�
    //姝ゅ,璇蜂负椤甸潰缈婚〉灞曠ず鍐呭瀹氫箟鏂规硶
    change_content:function change_content(per_num,current_page) {
      per_num = per_num ? per_num : 10;//姣忛〉鏄剧ず鏉℃暟,榛樿涓�10鏉�
      current_page = current_page ? current_page : 1;//褰撳墠椤�,榛樿涓�1
      /*姝ゅ鏍规嵁椤圭洰瀹為檯鑷缂栧啓椤甸潰鏄剧ず鍐呭鐨勬柟娉�,涓句緥璇存槑:*/
      var page_content='<ul style="width: 300px;margin: 10px auto;">';//褰撳墠椤靛唴瀹�
      for(var i=0;i<per_num;i++){
        page_content+='<li>'+((current_page-1)*per_num+i+1)+',鍒嗛〉鍐呭鏂规硶2</li>';
      }
      page_content+='</ul>';
      $(this.obj_box).children('.page_content').html(page_content);
    }
  };
   page_ctrl(obj_1);//璋冪敤鍒嗛〉鎻掍欢
  page_ctrl(obj_2);//璋冪敤鍒嗛〉鎻掍欢